using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._Analysis
{
    /// <summary>
    /// <para>Enrich Layer</para>
    /// <para>Enriches data by adding demographic and landscape facts about the people and places that surround or are inside data locations.</para>
    /// <para>通过添加有关数据位置周围或位于数据位置内的人员和地点的人口统计和景观事实来丰富数据。</para>
    /// </summary>    
    [DisplayName("Enrich Layer")]
    public class EnrichLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnrichLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features that will be enriched.</para>
        /// <para>将丰富的功能。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output layer containing both the input attributes and user-selected attributes. Selected attributes are summarized from underlying demographic boundaries. Only the area inside the input boundary is considered.</para>
        /// <para>同时包含输入属性和用户选择属性的输出图层。所选属性是根据基础人口统计边界进行汇总的。仅考虑输入边界内的区域。</para>
        /// </param>
        public EnrichLayer(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Enrich Layer";

        public override string CallName => "ba.EnrichLayer";

        public override List<string> AcceptEnvironments => ["baDataSource", "baUseDetailedAggregation", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _variables, _buffer_type, _distance, _unit];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features that will be enriched.</para>
        /// <para>将丰富的功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output layer containing both the input attributes and user-selected attributes. Selected attributes are summarized from underlying demographic boundaries. Only the area inside the input boundary is considered.</para>
        /// <para>同时包含输入属性和用户选择属性的输出图层。所选属性是根据基础人口统计边界进行汇总的。仅考虑输入边界内的区域。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Variables</para>
        /// <para>One or more variables that will be summarized and added to the output feature class.</para>
        /// <para>将汇总并添加到输出要素类的一个或多个变量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Variables")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _variables { get; set; } = null;


        /// <summary>
        /// <para>Define areas to enrich</para>
        /// <para><xdoc>
        ///   <para>Defines the area that will be enriched. The default value is Straight Line.</para>
        ///   <para>When you're signed in to ArcGIS Online, travel mode options are dynamically populated. Input line features can only use the Straight Line distance method.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将要扩充的区域。默认值为 Straight Line。</para>
        ///   <para>登录到 ArcGIS Online 后，将动态填充出行模式选项。输入线要素只能使用直线距离方法。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Define areas to enrich")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _buffer_type { get; set; } = null;


        /// <summary>
        /// <para>Distance or time</para>
        /// <para>The distance or size of an area to enrich, for example, a 1-mile buffer or 5-minute walk time. Units correspond to the polygon type. The default value is 1.</para>
        /// <para>要丰富的区域的距离或大小，例如，1 英里的缓冲区或 5 分钟的步行时间。单位对应于多边形类型。默认值为 1。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance or time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _distance { get; set; } = 1;


        /// <summary>
        /// <para>Unit</para>
        /// <para>The units associated with the Distance or time parameter. The default value is Kilometers.</para>
        /// <para>与距离或时间参数关联的单位。默认值为 Kilometers。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Unit")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _unit { get; set; } = null;


        public EnrichLayer SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}